package org.zhadoop.stream.cql.semanticanalyzer.parser.visitor;

import org.antlr.v4.runtime.misc.NotNull;
import org.zhadoop.stream.cql.semanticanalyzer.parser.CQLParser.ExpressionContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.CaseHeadExpressionContext;

/**
 * case when 开始部分语法遍历
 * @author zwd
 *
 */
public class CaseHeadExpressionVisitor extends AbsCQLParserBaseVisitor<CaseHeadExpressionContext>{

	private CaseHeadExpressionContext context = null;
	
	public CaseHeadExpressionVisitor() {
		context = new CaseHeadExpressionContext();
	}
	
	@Override
	protected CaseHeadExpressionContext defaultResult() {
		return context;
	}
	
	@Override
	public CaseHeadExpressionContext visitExpression(@NotNull ExpressionContext ctx) {
		ExpressionVisitor visitor = new ExpressionVisitor();
        context.setExpression(visitor.visit(ctx));
        return context;
	}

}
